/*
package com.infore.exchange.main.config;

import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


*/
/**
 * RabbitMQ配置类
 *//*

@Configuration
public class RabbitConfig {

    public static final  String EXCHANGE_NAME = "data_exchange";
    public static final  String QUEUE_NAME = "data_queue";
    public static final  String ROUTING_KEY = "data_routing";



    */
/**
     * 创建交换机
     * @return
     *//*

    @Bean("dataExchange")
    public Exchange getExchange()
    {
        return ExchangeBuilder
                //交换机类型 ;参数为名字
                .topicExchange(EXCHANGE_NAME)
                //是否持久化，true即存到磁盘,false只在内存上
                .durable(true)
                .build();
    }

    */
/**
     * 创建队列
     * @return
     *//*

    @Bean("dataQueue")
    public Queue getMessageQueue()
    {
        return new Queue(QUEUE_NAME);
    }

    */
/**
     * 交换机绑定队列
     * @param exchange
     * @param queue
     * @return
     *//*

    //@Qualifier注解,使用名称装配进行使用
    @Bean
    public Binding bindMessageQueue(@Qualifier("dataExchange") Exchange exchange, @Qualifier("dataQueue") Queue queue)
    {
        return BindingBuilder
                .bind(queue)
                .to(exchange)
                .with(ROUTING_KEY)
                .noargs();
    }
}
*/
